from typing import Optional
from pydantic import BaseModel, Field
from .base import BaseSchema

class PermissionBase(BaseSchema):
    """权限基础模型"""
    name: str = Field(..., max_length=50, description="权限名称")
    description: Optional[str] = Field(None, max_length=255, description="权限描述")

class PermissionCreate(PermissionBase):
    """创建权限模型"""
    pass

class PermissionUpdate(PermissionBase):
    """更新权限模型"""
    pass

class PermissionSchema(PermissionBase):
    """权限响应模型"""
    pass